<?php

declare(strict_types=1);

namespace App\Controller;

use Grpc\HelloReq;
use Grpc\HelloRes;

/**
 *
 * Grpc 控制器
 *
 */
class GrpcController extends AbstractController
{
  public function hello(HelloReq $message)
  {
    $resp = new HelloRes();

    $resp->setAge(30);
    $resp->setData(['address' => 10]);
    $resp->setExtra($message);
    $resp->setPersons(['zhangsan', 'lisi']);
    $resp->setMsg('hello');


    return $resp;
  }
}
